package com.base_java.common;

/**
 * @description:
 * @author: mingtai
 * @createDate: 0:58 2020/4/14
 * @version: 1.0
 */
public enum ResponseCode {

    /**
     * 公共返回枚举类
     */
    SUCCESS(0, "SUCCESS"),
    ERROR(1, "ERROR"),
    NEED_LOGIN(10, "NEED_LOGIN"),
    ILLEGAL_ARGUMENT(2, "ILLEGAL_ARGUMENT"),
    NO_ACCESS(-1, "NO_ACCESS");

    private final int code;
    private final String desc;

    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
